package com.uzai.console.enums;

/**
 * 数据删除状态
 * @Auther: liuqi
 * @Date: 2021/8/19 11:22
 * @Description:
 */
public enum ReqUserNotPassTypeEnum {
    VALID(0,"未知原因"),
    BLACKLIST(1,"黑名单"), //已弃用，具体细分到黑名单类型中，增加了类型11，12，13
    DAYMAX(2,"达到日限"),
    GENDER (3,"性别拦截"),
    NIGHT(4,"夜间不通过"),
    KEYWORD(5,"关键词过滤"),
    REPEATADD(6,"会员重复请求添加好友"),

    BLACKLIST_PRI(11,"私有黑名单"),
    BLACKLIST_PUB(12,"全网黑名单"),
    BLACKLIST_REWARD(13,"上级是营销奖励黑名单"),
    BLACKLIST_PRI_PARENT(14,"上级是私有黑名单"),
    BLACKLIST_PUB_PARENT(15,"上级是全网黑名单"),

    ;

    private Integer id;
    private String desc;

    ReqUserNotPassTypeEnum(Integer id, String desc) {
        this.id = id;
        this.desc = desc;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static ReqUserNotPassTypeEnum getById(Integer id) {
        if (id == null) {
            return null;
        }
        for (ReqUserNotPassTypeEnum type: ReqUserNotPassTypeEnum.values()) {
            if (type.getId().intValue() == id.intValue()) {
                return type;
            }
        }
        return null;
    }
}
